gtkprogressbar: fix size allocation
authorLars Uebernickel <lars.uebernickel@canonical.com>
Tue, 24 Mar 2015 13:25:49 +0000 (14:25 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 28 Mar 2015 23:00:06 +0000 (19:00 -0400)
commitada97b092810e456459dd428d620fdf7bfdf1783
tree52ab6d8997e135e37bc86e45a60fd6443e7e2b38
parentae430b1b808c0b930021c843b26faa259c11f3e8
gtkprogressbar: fix size allocation

As of 74405cc, progress bars use a new design with values drawn on top
(or to the left) of the through instead of inside of it. This change
brought a number of regressions: the min-horizontal-bar-height and
min-vertical-bar-width style properties are not respected anymore. For
vertical progress bars, the value was drawn too close to the bar and not
centered vertically.

Fix this by respecting the style properties and drawing the value label
at the correct position.

Also, the xspacing and yspacing properties didn't server any apparent
purpose. Change their semantics to mean "the spacing between the label
and the bar". Hence, they only need to be added to the size request when
showing the label. Since we are changing semantics anyway, reduce their
default values from 7 to 2, to avoid and excessive gap.

https://bugzilla.gnome.org/show_bug.cgi?id=746688
gtk/gtkprogressbar.c